﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ModulesInfrastructure;
using ShellInfrastructure;
using ModuleAddPlace.Views;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using ModuleAddPlace.ViewModels;

namespace ModuleAddPlace
{
    public class AddPlaceModule : SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.RightRegionName, () => UnityContainer.Resolve<IAddPlaceView>());
        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IAddPlaceView, AddPlaceView>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IAddPlaceViewModel, AddPlaceViewModel>(new ContainerControlledLifetimeManager());
        }
    }
}
